SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW [dbo].[vwlplazasacerrar]
AS
SELECT        dbo.tb_CierresDeReestructura.idCierreReestructura AS ID, dbo.tb_CierresDeReestructura.Reestructura, dbo.tb_CierresDeReestructura.Observaciones, 
                         dbo.tb_Reestructuras.Descripcion, dbo.tb_EstadosDeReestructura.Descripcion AS Estado, dbo.tb_Plazas.CUPOF
FROM            dbo.tb_CierresDeReestructura INNER JOIN
                         dbo.tb_Reestructuras ON dbo.tb_CierresDeReestructura.Reestructura = dbo.tb_Reestructuras.IDReestructura INNER JOIN
                         dbo.tb_EstadosDeReestructura ON dbo.tb_CierresDeReestructura.Estado = dbo.tb_EstadosDeReestructura.idEstadoReestructura INNER JOIN
                         dbo.tb_Plazas ON dbo.tb_CierresDeReestructura.PlazaACerrar = dbo.tb_Plazas.idPlaza
GO
GRANT SELECT ON  [dbo].[vwlplazasacerrar] TO [AdministracionSagenet]
GRANT SELECT ON  [dbo].[vwlplazasacerrar] TO [Informatica]
GRANT INSERT ON  [dbo].[vwlplazasacerrar] TO [Informatica]
GRANT DELETE ON  [dbo].[vwlplazasacerrar] TO [Informatica]
GRANT UPDATE ON  [dbo].[vwlplazasacerrar] TO [Informatica]
GRANT SELECT ON  [dbo].[vwlplazasacerrar] TO [Reestructura]
GRANT SELECT ON  [dbo].[vwlplazasacerrar] TO [SoloVer]
GO
